<?php

/**
 * 控制器基类
 */
class Controller
{
	public $data = [];
	public function display($template_name='')
	{

		extract($this->data);

		if($template_name){
			include VIEW_PATH.'/'.$template_name.'.html';
		}else{
			include VIEW_PATH.'/'.strtolower(CONTROLLER_NAME).'/'.ACTION_NAME.'.html';
		}
		
	}

	public function assgin($key,$value)
	{
		$this->data[$key] = $value;
	}
}
